Type Checking Higher - Order Polymorphic Multi - MethodsFran

نویسنده

  • Stephan Merz
چکیده

We present a new predicative and decidable type system , called ML , suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML 21, 28], and class-based object-oriented programming and higher-order multi-methods in the tradition of CLOS 12]. Instead of using ex-tensible records as a foundation for object-oriented extensions of functional languages, we propose to rein-terpret ML datatype declarations as abstract and concrete class declarations, and to replace pattern matching on run-time values by dynamic dispatch on run-time types. ML is based on universally quantiied polymor-phic constrained types. Constraints are conjunctions of inequalities between monotypes built from type con-structors organized into extensible and partially ordered classes. We give type checking rules for a small, explicitly typed functional language a la XML 20] with multi-methods, show that the resulting system has de-cidable minimal types, and discuss subject reduction. Finally, we propose a new object-oriented programming language based on the ML type system.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Lightweight Lemmas in Prolog 1

Prolog is known to be well-suited for expressing and implementing logics and inference systems. We show that lemmas and deenitions in such logics can be implemented with a great economy of expression. We encode a polymorphic higher-order logic using the ML-style polymorphism of Prolog. The terms of the metalanguage (Prolog) can be used to express the statement of a lemma, and metalanguage type-...

متن کامل

MetaKlaim: a type safe multi-stage language for global computing

This paper describes the design and the semantics of MetaKlaim, an higher order distributed process calculus equipped with staging mechanisms. MetaKlaim integrates MetaML (an extension of SML for multi-stage programming) and Klaim (a Kernel Language for Agents Interaction and Mobility), to permit interleaving of meta-programming activities (like assembly and linking of code fragments), dynamic ...

متن کامل

Catch me if you can Towards type-safe, hierarchical, lightweight, polymorphic and efficient error management in OCaml

This is the year 2008 and ML-style exceptions are everywhere. Most modern languages, whether academic or industrial, feature some variant of this mechanism. Languages such as Java even have a degree of out-of-the-box static coverage-checking for such exceptions, which is currently not available for ML languages, at least not without resorting to external tools. In this document, we demonstrate ...

متن کامل

Types and trace effects of higher order programs

This paper shows how type effect systems can be combined with model-checking techniques to produce powerful, automatically verifiable program logics for higher order programs. The properties verified are based on the ordered sequence of events that occur during program execution, so called event traces. Our type and effect systems infer conservative approximations of the event traces arising at...

متن کامل

Extended Static Checking of Call-by-Value Functional Programs

We present a Hoare logic for a call-by-value programming language equipped with recursive, higher-order functions, algebraic data types, and a polymorphic type system in the style of Hindley and Milner. It is the theoretical basis for a tool that extracts proof obligations out of programs annotated with logical assertions. These proof obligations, expressed in a typed, higher-order logic, are d...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997